﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using VisionCloud.Domain.ModelAttribute;

namespace VisionCloud.Domain.DtoModel.Ms
{
    public class StandardClass
    {
        /// <summary>
        /// 编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        public string ClassName { get; set; }

        /// <summary>
        /// 预警值
        /// </summary>
        public decimal WarningValue { get; set; }

        /// <summary>
        /// 明细项
        /// </summary>
        public List<StandardItem> Items { get; set; }
    }

    public class StandardItem
    {
        /// <summary>
        /// 测量明细ID
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 子标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 数值（如：门洞对应长检测偏差）
        /// </summary>
        public object Value { get; set; }

        /// <summary>
        /// 数值（如：门洞对应宽检测偏差）
        /// </summary>
        public object WValue { get; set; }

        /// <summary>
        /// 厚数值
        /// </summary>
        public object DValue { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        public string Unit { get; set; }

        /// <summary>
        /// 数值说明
        /// </summary>
        public string ValueDesc { get; set; }

        /// <summary>
        /// 编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 支持的工艺
        /// </summary>
        public string SupportCraft { get; set; }

        /// <summary>
        /// 支持的标准
        /// </summary>
        public string SupportStandard { get; set; }

        /// <summary>
        /// 检测类型（0：人工测量，1：机器测量）
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 是否有设计值
        /// </summary>
        public int HasDesignValue { get; set; }
    }

    public class StandardGetListByPorject
    {
        public Guid ProjectGuid { get; set; }
    }

    public class StandardListModel
    {
        public Guid ProjectStandardId { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 阶段
        /// </summary>
        public string Stage { get; set; }

        /// <summary>
        /// 条项
        /// </summary>
        public List<StandardClass> Classes { get; set; }

        /// <summary>
        /// 测量模板明细
        /// </summary>
        public List<StandardClass> Templates { get; set; }

        public Guid ProjectGuid { get; set; }
        public Guid CompanyGuid { get; set; }

        public Guid MsProjectStandardId { get; set; }
    }

    public class StandardCondition
    {
        public Guid ProjectStandardId { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 阶段
        /// </summary>
        public string Stage { get; set; }
    }

    public class StageStandardQueryDto
    {
        /// <summary>
        /// 标准库Id
        /// </summary>
        [GuidRequired]
        public Guid StandardId { get; set; }

        /// <summary>
        /// 项目Id
        /// </summary>
        [GuidRequired]
        public Guid ProjectId { get; set; }

        /// <summary>
        /// 楼栋
        /// </summary>
        [Required]
        public string BuildingBlock { get; set; }

        /// <summary>
        /// 0:人工测量 1：机器测量
        /// </summary>
        public int Type { get; set; }
    }
}